<!DOCTYPE html>
<html lang="zh-ch">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <title>开发费用情况归集表</title>
    <link rel="stylesheet" href="ADMIN_PUBLIC/fonts_style/iconfont.css">
    <link href="ADMIN_PUBLIC/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="ADMIN_PUBLIC/css/lu_common.css">

<style>
	#export{
		padding:60px 0 50px 60px;
		background-color:#fff;
	}
	#export span{
		color:#333;
		font-size:14px;
	}
	#export>div{
		margin-bottom:30px;
	}
	#export>button{
		margin-top:10px;
		padding:8px 15px;
		border-radius:3px;
		border:none;
		background-color:#1696e4;
		font-size:14px;
		color:#fff;
		margin-left:40px;
	}
	select{
		padding:5px 10px;
		font-size:14px;
	}
</style>
</head>
<body>

<div id='export'>
	<div>
		<span>年度：</span>
		<select id="time"></select>
	</div>
<!-- 	<div>
		<span>项目：</span>
		<select id="project"></select>
	</div> -->
	<button id='btn'>导出</button>
</div>

<script src="ADMIN_PUBLIC/js/jquery.min.js"></script>
<script>
	let date = (new Date()).getFullYear()
	let time = ''
	for(let year = date-5; year <= date; year++){
		time += `<option value='${year}'>${year}</option>`
	}
	$('#time').html(time)

	// $.ajax({
	// 	url:'/Admin/Project/projectNI',
	// 	type:'get',
	// 	success:function(data){
	// 		if(data.code==1){
	// 			let datas = data.res;
	// 			let htmls = ''
	// 			for(let key of datas){
	// 				htmls+=`<option value='${key.pro_name}'>${key.pro_name}</option>`
	// 			}
	// 			$('#project').html(htmls)
	// 		}
	// 	}
	// })

	$('#btn').click(function(e){
		e.preventDefault();
		let year = $('#time').val()
		window.open(`/Admin/Project/exportProMX?year=${year}`,"_blank");
	})
</script>
</body>
</html>